package PlantasWicket

import modelo.Jugador
import org.apache.wicket.markup.html.WebPage
import org.apache.wicket.markup.html.basic.Label
import org.apache.wicket.markup.html.panel.Panel
import org.apache.wicket.model.CompoundPropertyModel
import org.uqbar.wicket.xtend.WicketExtensionFactoryMethods
import paneles.PanelJardin

/**
 * 
 * @author ?
 */
class HomePage extends WebPage {
	extension WicketExtensionFactoryMethods = new WicketExtensionFactoryMethods
	@Property Panel jardinPrincipalA

	public new() {
		var jugador = new Jugador()
		defaultModel = new CompoundPropertyModel(jugador)
		this.addChild(new Label("nombre"))
		this.addChild(new Label("monedero"))

		this.addChild(new Label("obs.msj1"))
		this.addChild(new Label("obs.msj2"))
		this.addChild(new Label("obs.msj3"))
		this.addChild(new Label("obs.msj4"))

		///////////////////////
		// Grilla principal //
		//////////////////////
		val jardinPrincipal = new LoginScreen("jardin", jugador);

		this.addChild(jardinPrincipal)

	}

	def getJugador() {
		this.getDefaultModelObject() as Jugador
	}

}
